﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

using LINQToolKit.Mapping;
using LINQToolKit.Web;

namespace LINQToolKit
{
    /// <summary>
    /// Interface for the data context
    /// </summary>
    /// <remarks>
    /// This framework is under the GNU licence and Creative Commons 3.0.
    /// You can also get a copy of the source code from google code
    /// <see cref="http://linqtodouban.googlecode.com/svn/trunk/"/>.
    /// For more information and further support, please contace with kevin (chwkai@gmail.com)
    /// </remarks>
    public interface IContext : IDisposable
    {
        IEntityProvider CreateProvider();

        IRequest CreateRequest();

        IMappingSource MappingSource { get; }

        IEntityTable<T> GetTable<T>();

        TextWriter Log { get; set; }
    }
}
